# linux like commands
#if brew list | grep coreutils > /dev/null; then
#    export PATH="/usr/local/opt/coreutils/libexec/gnubin:$PATH"
#    alias ls='ls -F --show-control-chars --color=auto'
#    eval `gdircolors -b $HOME/.dir_colors`
#fi

if [ -r $HOME/.bin ]; then
    export PATH="$PATH:$HOME/.bin"
fi

if type brew>/dev/null 2>&1; then
    brew_prefix=$(brew --prefix)
    if [ -f $brew_prefix/etc/bash_completion ]; then
        source $brew_prefix/etc/bash_completion
    fi
fi

export CLICOLOR=1

#PS1="\n$PURPLE=> $GREEN\w\n$BLUE\u$BCYAN@${YELLOW}\H $PURPLE\A $BCYAN>>$RESET "
PS1="\n$PURPLE=> $GREEN"'$(pwd | sed "s/^\/\([^\/]\+\)\/.*\/\([^\/]\+\)\/\([^\/]\+\)\/\([^\/]*\)$/\/\1\/ ... \/\3\/\4/")'"\n$BLUE\u$BCYAN@${YELLOW}\H$PURPLE"'$(test -n "$(git branch 2>/dev/null)" && echo " [")'"$BYELLOW"'$(git branch 2>/dev/null | grep "^*" | cut -d " " -f 2,2)'"$PURPLE"'$(test -n "$(git branch 2>/dev/null)" && echo "]")'" $BLUE \A $BCYAN->$RESET "
